package com.mysqldemo.entity.po;

import java.io.Serializable;
import com.mysqldemo.enums.DateTimeEnum;
import com.mysqldemo.utils.DateUtils;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;




/**
 * @Description 点赞记录
 * @Author 徐大勇
 * @Version 1.8.0_131
 * @date 2023/07/06
 */
public class Record implements Serializable{

	/**
	 * 自增ID
	 */
	private  Integer opId;

	/**
	 * 操作类型0:文章点赞 1:评论点赞
	 */
	private  Integer opType;

	/**
	 * 发布时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private  Date createTime;

	public void setOpId(Integer opId) {
		this.opId = opId;
	}

	public Integer getOpId() {
		return this.opId;
	}
	public void setOpType(Integer opType) {
		this.opType = opType;
	}

	public Integer getOpType() {
		return this.opType;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getCreateTime() {
		return this.createTime;
	}
	@Override
	public String toString() {
		return "自增ID : " + (opId == null ? "空" : opId) + "," + "操作类型0:文章点赞 1:评论点赞 : " + (opType == null ? "空" : opType) + "," + "发布时间 : " + (DateUtils.format(createTime,DateTimeEnum.YYYY_MM_DD_HH_MM_SS.getPattern()) == null ? "空" : DateUtils.format(createTime,DateTimeEnum.YYYY_MM_DD_HH_MM_SS.getPattern()));
	}
}
